Skip to content

Fix for Vlan doesn't match issue while adding IP range for the shared network without any IP range #10837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented May 8, 2025

Description

This PR fixes Vlan doesn't match issue while adding IP range for the shared network without any IP range.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Before Fix:

SharedNetwork_AddIpRange_VlanMismatchIssue

After Fix:

SharedNetwork_AddIpRange_AfterFix

How Has This Been Tested?

  • Create a shared network, delete the ip range and add new ip range.

How did you try to break this feature and the system with this change?

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@sureshanaparti sureshanaparti force-pushed the shared-network-vlan-doesnt-match-issue-while-adding-ip-range branch from c67649a to 4efa3af Compare May 8, 2025 15:13
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 28.88889% with 32 lines in your changes missing coverage. Please review.

Project coverage is 15.17%. Comparing base (f0838cd) to head (deb77a1).
Report is 15 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../cloud/configuration/ConfigurationManagerImpl.java 28.88% 27 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               4.19   #10837    +/-   ##
==========================================
  Coverage     15.17%   15.17%            
- Complexity    11339    11349    +10     
==========================================
  Files          5414     5415     +1     
  Lines        475185   475591   +406     
  Branches      57991    58037    +46     
==========================================
+ Hits          72105    72167    +62     
- Misses       395018   395351   +333     
- Partials       8062     8073    +11     
Flag Coverage Δ
uitests 4.28% <ø> (-0.01%) ⬇️
unittests 15.90% <28.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13303

@sureshanaparti sureshanaparti marked this pull request as ready for review May 9, 2025 06:47
@sureshanaparti
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

not tested yet

@blueorangutan
Copy link

[SF] Trillian test result (tid-13244)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 55177 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10837-t13244-kvm-ol8.zip
Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_create_iso_with_checksum_md5 Error 66.78 test_iso.py

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-13275)

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13287)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 47722 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10837-t13287-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Comment on lines 4410 to 4423
Long networkId = cmd.getNetworkID();
Long physicalNetworkId = cmd.getPhysicalNetworkId();

// Verify that network exists
Network network = null;
if (networkId != null) {
network = _networkDao.findById(networkId);
if (network == null) {
throw new InvalidParameterValueException("Unable to find network by id " + networkId);
} else {
zoneId = network.getDataCenterId();
physicalNetworkId = network.getPhysicalNetworkId();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be a seperate method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 4426 to 4432
if (StringUtils.isBlank(vlanId)) {
vlanId = Vlan.UNTAGGED;
if (network != null & network.getTrafficType() == TrafficType.Guest) {
boolean connectivityWithoutVlan = isConnectivityWithoutVlan(network);
vlanId = getNetworkVlanId(network, connectivityWithoutVlan);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be an extra method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13302)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 55096 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10837-t13302-kvm-ol8.zip
Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_10_vpc_tier_kubernetes_cluster Failure 3749.69 test_kubernetes_clusters.py

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13394

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

  1. Create a shared network by providing IP range and a vlan > network state in setup
  2. Delete the shared network range
  3. Add a IP range again
  4. Ip range added successfully

before fix exception was thrown

Screenshot 2025-05-15 at 4 28 17 PM

After fix no exception is thrown

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13321)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 53102 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10837-t13321-kvm-ol8.zip
Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_list_cpvm_vm Failure 0.06 test_ssvm.py
test_04_cpvm_internals Failure 0.05 test_ssvm.py

@DaanHoogland DaanHoogland merged commit 13ab8a0 into apache:4.19 May 16, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants